package com.sne.common.enums;

/**
 * <p>
 * 结果码
 * </p>
 *
 * @author fanghh
 * @since 2020/1/3
 */
public enum ResultCode {
    /**
     * 成功
     */
    SUCCESS(200, "成功"),
    /**
     * 失败
     */
    FAIL(500, "失败"),
    /**
     * 参数错误
     */
    PARAM_INVALID(400, "参数错误"),
    /**
     * 验证失败
     */
    UNAUTHORIZED(401, "验证失败"),
    /**
     * 没有权限
     */
    FORBIDDEN(403, "没有权限");

    private Integer code;
    private String msg;

    ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
